import moment from 'moment';
const ProductListSearchKeys = [
  {
    key: 'cnName',
    label: '商品中文名称',
    placeholder: '请输入商品中文名称',
    input: true,
    rules: [
      {
        required: false,
      },
    ],
  },
  {
    key: 'spuCode',
    label: 'SPU编码',
    placeholder: '请输入SPU编码',
    input: true,
    rules: [
      {
        required: false,
      },
    ],
  },
  {
    key: 'supplyCode',
    label: '供应商SPU',
    placeholder: '请输入供应商SPU',
    input: true,
    rules: [
      {
        required: false,
      },
    ],
  },
  {
    key: 'lifeCycle',
    label: '上架状态',
    placeholder: '请选择上架状态',
    select: true,
    rules: [
      {
        required: false,
      },
    ],
  },
];
const ProductListColumn = [
  { title: '编号', width: 50, align: 'center', dataIndex: 'id' },
  { title: '商品名', width: 110, align: 'center', dataIndex: 'name' },
  //   { title: '商品中文名', width:120, align: 'center', dataIndex: 'cnName' },
  { title: 'SPU', width: 90, align: 'center', dataIndex: 'spuCode' },
  { title: '供应商SPU', width: 90, align: 'center', dataIndex: 'supplyCode' },
  {
    title: '采购价格(¥)',
    width: 90,
    align: 'center',
    dataIndex: 'purchasePriceRange',
  },
  {
    title: '上架',
    dataIndex: 'lifeCycle',
    width: 90,
    align: 'center',
    render: (v) => {
      return v == 0 ? '下架' : '上架';
    },
  },
];
const ProductListModalKeys = [
  {
    key: 'employeeName',
    label: '资金账户名称',
    placeholder: '资金账户名称',
    input: true,
    maxLength: 50,
    rules: [
      {
        required: true,
        message: '资金账户名称',
      },
    ],
  },
  {
    key: 'allow',
    label: '是否允许欠款',
    switcher: true,
    rules: [
      {
        required: true,
        message: '是否允许欠款',
      },
    ],
  },
  {
    key: 'type',
    label: '币种',
    placeholder: '请选择币种',
    select: true,
    rules: [
      {
        required: true,
        message: '请选择币种',
      },
    ],
  },
  {
    key: 'tops',
    label: '永久额度',
    placeholder: '请输入永久额度',
    inputNumber: true,
    precision: 2,
    maxLength: 0,
    rules: [
      {
        required: true,
        message: '请输入永久额度',
      },
    ],
  },
  {
    key: 'rat',
    label: '手续费客户承担比例',
    placeholder: '请输入手续费客户承担比例',
    inputNumber: true,
    precision: 2,
    maxLength: 0,
    rules: [
      {
        required: true,
        message: '请输入手续费客户承担比例',
      },
    ],
  },
  {
    key: 'client',
    label: '客户',
    selectMode: 'multiple',
    placeholder: '请选择客户',
    select: true,
    rules: [
      {
        required: true,
        message: '请选择客户',
      },
    ],
  },
];

export { ProductListSearchKeys, ProductListColumn, ProductListModalKeys };
